<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ page contentType="text/html; charset=utf-8" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>平台管理系统</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="/layuiadmin/layui/css/layui.css"
          media="all">
    <link rel="stylesheet" href="/layuiadmin/style/admin.css" media="all">
    <link rel="stylesheet" type="text/css"
          href="/css/plugins/dropzone/basic.css"/>
    <link rel="stylesheet" type="text/css"
          href="/css/plugins/dropzone/dropzone.css"/>
    <link rel="stylesheet" type="text/css"
          href="/css/plugins/layui-formSelect/formSelects-v4.css"/>
    <link rel="stylesheet" type="text/css" href="/css/plat-style.css"/>
    <style>
        img {
            margin-left: 5px
        }

        .detail_title {
            font-weight: bold;
            color: black;
        }

        tr th {
            text-align: center !important;
        }

        tr td {
            text-align: center !important;
        }

        .seksqwjg {
            font-size: 1.2em;
            color: #ff6600;
        }

        .money li {
            text-align: right;
        }

        .layui-card-header .layui-icon {
            line-height: initial;
            position: absolute;
            left: -5px;
            top: 47%;
            margin-top: -7px;
        }

        .layui-card-header .goodsMoney {
            line-height: initial;
            position: absolute;
            right: 15px;
            top: 50%;
            margin-top: -7px;
        }
    </style>
</head>
<body>
<div class="layui-col-md12">
    <div class="layui-card">
        <div class="layui-card-header">
            <div class="layui-col-md-offset11">
                <button class="layui-btn layui-btn-sm layui-btn-normal" onclick="history.go(-1)">返回上一页
                </button>
            </div>
        </div>
        <div class="layui-card-body">
            <div class="layui-container" style="margin-top: 20px">
                <div class="layui-card-body">
                    <blockquote class="layui-elem-quote">当前订单状态：<span
                            style="color: red;">${order.orderStatusName }</span></blockquote>

                    <!-- 基本信息 -->
                    <div class="layui-card-header"><i class="layui-icon layui-icon-note"></i>基本信息</div>
                    <div class="layui-table-body layui-table-main">
                        <table class="layui-table" lay-skin="row" lay-size="lg" lay-even="">
                            <thead>
                            <tr>
                                <th>
                                    <div class="layui-table-cell">订单编号</div>
                                </th>
                                <th>
                                    <div class="layui-table-cell">交易单号</div>
                                </th>
                                <th>
                                    <div class="layui-table-cell">用户账户</div>
                                </th>
                                <th>
                                    <div class="layui-table-cell">支付方式</div>
                                </th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr>
                                <td>
                                    <div class="layui-table-cell">${order.orderCode }</div>
                                </td>
                                <td>
                                    <div class="layui-table-cell">${order.payCode }</div>
                                </td>
                                <td>
                                    <div class="layui-table-cell">${order.phone }</div>
                                </td>
                                <td>
                                    <div class="layui-table-cell">${order.payTypeName }</div>
                                </td>
                            </tr>
                            <tr>
                                <th>
                                    <div class="layui-table-cell">订单类型</div>
                                </th>
                                <th>
                                    <div class="layui-table-cell">订单来源</div>
                                </th>
                                <th>
                                    <div class="layui-table-cell">订单标签</div>
                                </th>
                                <th>
                                    <div class="layui-table-cell">优惠说明</div>
                                </th>
                            </tr>
                            <tr>
                                <td>
                                    <div class="layui-table-cell">${order.orderTypeName }</div>
                                </td>
                                <td>
                                    <div class="layui-table-cell">${order.orderFromChannel }</div>
                                </td>
                                <td>
                                    <div class="layui-table-cell">${order.label }</div>
                                </td>
                                <td>
                                    <div class="layui-table-cell">${order.proExplain }</div>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                    <%--充值订单详情--%>
                    <c:if test="${order.orderType == 5}">
                    <div class="layui-card-header"><i class="layui-icon layui-icon-note"></i>充值信息</div>
                    <div class="layui-table-body layui-table-main">
                        <table class="layui-table" lay-skin="row" lay-size="lg" lay-even="">
                            <thead>
                            <tr>
                                <th>
                                    <div class="layui-table-cell">充值类型</div>
                                </th>
                                <th>
                                    <div class="layui-table-cell">聚合订单号</div>
                                </th>
                                <c:if test="${rechargeDetail.type == 1}">
                                    <th>
                                        <div class="layui-table-cell">充值号码</div>
                                    </th>
                                </c:if>
                                <c:if test="${rechargeDetail.type == 2}">
                                    <th>
                                        <div class="layui-table-cell">加油卡号码</div>
                                    </th>
                                    <th>
                                        <div class="layui-table-cell">加油卡类型</div>
                                    </th>
                                </c:if>
                            </tr>
                            </thead>
                            <tbody>
                            <tr>
                                <td>
                                    <div class="layui-table-cell">${rechargeDetail.type == 1?'话费充值':'加油卡充值' }</div>
                                </td>
                                <td>
                                    <div class="layui-table-cell">${rechargeDetail.jhOrdercode }</div>
                                </td>
                                <c:if test="${rechargeDetail.type == 1}">
                                    <td>
                                        <div class="layui-table-cell">${rechargeDetail.phone }</div>
                                    </td>
                                </c:if>
                                <c:if test="${rechargeDetail.type == 2}">
                                    <td>
                                        <div class="layui-table-cell">${rechargeDetail.gameuserid }</div>
                                    </td>
                                    <td>
                                        <div class="layui-table-cell">${rechargeDetail.chargetype == 1?'中石化':'中石油' }</div>
                                    </td>
                                </c:if>
                            </tr>
                            </tbody>
                        </table>
                        </c:if>


                        <!-- 物流信息 -->
                        <c:if test="${order.orderType != 5}">
                            <div class="layui-card-header"><i class="layui-icon layui-icon-note"></i>物流信息</div>
                            <div class="layui-table-body layui-table-main">
                                <table class="layui-table" lay-skin="row" lay-size="lg" lay-even="">
                                    <tbody>
                                    <tr>
                                        <th>
                                            <div class="layui-table-cell">配送方式</div>
                                        </th>
                                        <th>
                                            <div class="layui-table-cell">物流公司</div>
                                        </th>
                                        <th>
                                            <div class="layui-table-cell">物流单号</div>
                                        </th>
                                            <%--<th><div class="layui-table-cell">发货仓库</div></th>--%>
                                    </tr>
                                    <c:forEach items="${order.expList}" var="e">
                                        <tr>
                                            <td>
                                                <div class="layui-table-cell">${!empty e ? e.receivedTypeName : '' }</div>
                                            </td>
                                            <td>
                                                <div class="layui-table-cell">${!empty e ? e.expName : '' }</div>
                                            </td>
                                            <td>
                                                <div class="layui-table-cell">${!empty e ? e.expNo : '' }</div>
                                            </td>
                                                <%--<td><div class="layui-table-cell">${!empty e ? e.warehouseName : '' }</div></td>--%>
                                        </tr>
                                    </c:forEach>
                                    </tbody>
                                </table>
                            </div>

                            <!-- 收货人信息 -->
                            <div class="layui-card-header"><i class="layui-icon layui-icon-note"></i>收货人信息</div>
                            <div class="layui-table-body layui-table-main">
                                <table class="layui-table" lay-skin="row" lay-size="lg" lay-even="">
                                    <thead>
                                    <tr>
                                        <th>
                                            <div class="layui-table-cell">收货人</div>
                                        </th>
                                        <th>
                                            <div class="layui-table-cell">手机号码</div>
                                        </th>
                                        <th>
                                            <div class="layui-table-cell">收货地址</div>
                                        </th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <tr>
                                        <td>
                                            <div class="layui-table-cell">${!empty order.expDetail ? order.expDetail.receiver : '' }</div>
                                        </td>
                                        <td>
                                            <div class="layui-table-cell">${!empty order.expDetail ? order.expDetail.phone : '' }</div>
                                        </td>
                                        <td>
                                            <div class="layui-table-cell">${!empty order.expDetail ? order.expDetail.addrPrefix : '' }${!empty order.expDetail ? order.expDetail.addressDetail : '' }</div>
                                        </td>
                                    </tr>
                                    </tbody>
                                </table>
                            </div>

                            <!-- 商品信息 -->
                            <div class="layui-card-header"><i class="layui-icon layui-icon-note"></i>商品信息</div>
                            <div class="layui-table-body layui-table-main">
                                <table class="layui-table" lay-size="lg" border="1">
                                    <thead>
                                    <tr>
                                        <th>
                                            <div class="cell">商品图片</div>
                                        </th>
                                        <th>
                                            <div class="layui-table-cell">商品名称</div>
                                        </th>
                                        <th>
                                            <div class="layui-table-cell">规格信息</div>
                                        </th>
                                        <th>
                                            <div class="layui-table-cell">单价</div>
                                        </th>
                                        <th>
                                            <div class="layui-table-cell">数量</div>
                                        </th>
                                        <th>
                                            <div class="layui-table-cell">小计</div>
                                        </th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <c:forEach items="${order.details }" var="d">
                                        <tr>
                                            <td>
                                                <div class="cell"><img src="${d.proUrl }" width="80px;" height="80px;"/>
                                                </div>
                                            </td>
                                            <td>
                                                <div class="layui-table-cell">${d.proName }</div>
                                            </td>
                                            <td>
                                                <div class="layui-table-cell">${d.proSpecName }</div>
                                            </td>
                                            <td>
                                                <div class="layui-table-cell">
                                                    <c:choose>
                                                        <c:when test="${order.orderType==4 }">${d.point }</c:when>
                                                        <c:otherwise>${d.price }</c:otherwise>
                                                    </c:choose>
                                                </div>
                                            </td>
                                            <td>
                                                <div class="layui-table-cell">${d.qty }</div>
                                            </td>
                                            <td>
                                                <div class="layui-table-cell">
                                                    <c:choose>
                                                        <c:when test="${order.orderType==4 }">${d.qty*d.point }</c:when>
                                                        <c:otherwise>${d.point }</c:otherwise>
                                                    </c:choose>
                                                </div>
                                            </td>
                                        </tr>
                                    </c:forEach>
                                    </tbody>
                                </table>
                                <div class="layui-card-header">
                            <span class="goodsMoney">商品合计：
	                            <span style="color: red;">
	                            	<c:choose>
                                        <c:when test="${order.orderType==4 }">${order.point }</c:when>
                                        <c:otherwise>${order.goodsMoney }</c:otherwise>
                                    </c:choose>
	                           	</span>
                           	</span>
                                </div>
                            </div>
                        </c:if>

                        <!-- 金额信息 -->
                        <div class="layui-card-header"><i class="layui-icon layui-icon-note"></i>金额信息</div>
                        <div class="layui-table-body layui-table-main">
                            <table class="layui-table" lay-skin="row" lay-size="lg" lay-even="">
                                <thead>
                                <tr>
                                    <th>
                                        <div class="layui-table-cell">商品合计</div>
                                    </th>
                                    <th>
                                        <div class="layui-table-cell">运费</div>
                                    </th>
                                    <th>
                                        <div class="layui-table-cell">折扣金额</div>
                                    </th>
                                    <th>
                                        <div class="layui-table-cell">订单总额</div>
                                    </th>
                                    <th>
                                        <div class="layui-table-cell">应付款金额</div>
                                    </th>
                                </tr>
                                </thead>
                                <tbody>
                                <tr>
                                    <td>
                                        <div class="layui-table-cell">${order.goodsMoney }</div>
                                    </td>
                                    <td>
                                        <div class="layui-table-cell">${order.expMoney }</div>
                                    </td>
                                    <td>
                                        <div class="layui-table-cell">${order.discountMoney }</div>
                                    </td>
                                    <td>
                                        <div class="layui-table-cell">${order.realMoney }</div>
                                    </td>
                                    <td>
                                        <div class="layui-table-cell">${order.payMoney }</div>
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script src="/layuiadmin/layui/layui.js"></script>
    <script>
        layui.config({
            //静态资源所在路径
            base: '/layuiadmin/'
        }).extend({
            //主入口模块
            index: 'lib/index'
        }).use(['index', 'view'], function () {
            var $ = layui.$, admin = layui.admin;
        });
    </script>
</body>
</html>